﻿<!-- License
// Copyright © 2014 Łukasz Świątkowski
// http://www.lukesw.net/
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library.  If not, see<http://www.gnu.org/licenses/> .
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:conv="clr-namespace:Luminous.Windows.Converters"
    xmlns:ctrl="clr-namespace:Luminous.Windows.Controls"
    >

    <KeySpline x:Key="CommandLinkSpline">0.5,0,0.5,1</KeySpline>

    <Style TargetType="{x:Type ctrl:CommandLink}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#151C55" />
        <Setter Property="FontSize" Value="12pt" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="12" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Margin="3" StrokeThickness="1" Stroke="#99333333" StrokeDashArray="1 2" SnapsToDevicePixels="True" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ctrl:CommandLink}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="StoryboardFocused" RepeatBehavior="Forever" Timeline.DesiredFrameRate="10">
                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderFocused" Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                <SplineColorKeyFrame KeyTime="0:0:0" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:1" Value="#A300C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:3" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderFocused" Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                <SplineColorKeyFrame KeyTime="0:0:0" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:1" Value="#8000C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:3" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardFocusedOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderFocused" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardFocusedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderFocused" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardDefaulted" RepeatBehavior="Forever" Timeline.DesiredFrameRate="10">
                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderDefaulted" Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                <SplineColorKeyFrame KeyTime="0:0:0" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:1" Value="#A300C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:3" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderDefaulted" Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                <SplineColorKeyFrame KeyTime="0:0:0" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:1" Value="#8000C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                                <SplineColorKeyFrame KeyTime="0:0:3" Value="#2900C9FD" KeySpline="{StaticResource CommandLinkSpline}" />
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardDefaultedOn">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderDefaulted" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardDefaultedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderDefaulted" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardPressed">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderPressed" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardPressedOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderPressed" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardMouseOver">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderMouseOver" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardMouseOverOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderMouseOver" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:1" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardImageMouseOver">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowHovered" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldHovered" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardImageMouseOverOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowHovered" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldHovered" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardDisabled">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="StoryboardDisabledOff">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BorderDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageArrowDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldNormal" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ImageShieldDisabled" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" KeySpline="{StaticResource CommandLinkSpline}" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
                        <Border x:Name="BorderDisabled" BorderBrush="#33333333" BorderThickness="1" CornerRadius="3" Opacity="0">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="#22333333" />
                                    <GradientStop Offset="1" Color="#11333333" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border x:Name="BorderFocused" BorderThickness="1" CornerRadius="3" Margin="1,0,1,0" Opacity="0">
                            <Border.BorderBrush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="Transparent" />
                                    <GradientStop Offset="1" Color="Transparent" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>
                        <Border x:Name="BorderDefaulted" BorderThickness="1" CornerRadius="3" Margin="1,0,1,0" Opacity="0">
                            <Border.BorderBrush>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="Transparent" />
                                    <GradientStop Offset="1" Color="Transparent" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>
                        <Border x:Name="BorderMouseOver" BorderBrush="#6B777777" BorderThickness="1" CornerRadius="3" Opacity="0">
                            <Border BorderThickness="1" CornerRadius="2">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="White" Offset="0" />
                                            <GradientStop Color="#87F2F2F2" Offset="0.5" />
                                            <GradientStop Color="#66E8E8E8" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border.BorderBrush>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#FCFFFFFF" Offset="0" />
                                            <GradientStop Color="#B7F9F9F9" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                            </Border>
                        </Border>
                        <Grid x:Name="BorderPressed" Opacity="0">
                            <Border BorderBrush="#99767676" BorderThickness="1" CornerRadius="3" Background="#66DEE1E1" />
                            <Border Margin="1" CornerRadius="2,0,0,2" Width="3" HorizontalAlignment="Left">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                                        <GradientStop Offset="0" Color="#20333333" />
                                        <GradientStop Offset="1" Color="#00333333" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1" CornerRadius="2,2,0,0" Height="6" VerticalAlignment="Top">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0" Color="#20333333" />
                                        <GradientStop Offset="1" Color="#00333333" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <StackPanel Orientation="Horizontal"  Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Grid Margin="-6,2,2,-2" VerticalAlignment="Top">
                                <Grid.Visibility>
                                    <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay">
                                        <Binding.Converter>
                                            <conv:CommandLinkIconToGridVisibilityValueConverter />
                                        </Binding.Converter>
                                    </Binding>
                                </Grid.Visibility>
                                <Image x:Name="ImageArrowNormal" Source="Resources/ArrowNormal.png">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                                <Image x:Name="ImageArrowHovered" Source="Resources/ArrowHovered.png" Opacity="0">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                                <Image x:Name="ImageArrowDisabled" Source="Resources/ArrowDisabled.png" Opacity="0">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                                <Image x:Name="ImageShieldNormal" Source="Resources/ShieldNormal.png">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay" ConverterParameter="True">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                                <Image x:Name="ImageShieldHovered" Source="Resources/ShieldHovered.png" Opacity="0">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay" ConverterParameter="True">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                                <Image x:Name="ImageShieldDisabled" Source="Resources/ShieldDisabled.png" Opacity="0">
                                    <Image.Visibility>
                                        <Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Mode="OneWay" ConverterParameter="True">
                                            <Binding.Converter>
                                                <conv:CommandLinkIconToVisibilityValueConverter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Image.Visibility>
                                </Image>
                            </Grid>
                            <StackPanel>
                                <Label TextBlock.LineHeight="{TemplateBinding FontSize}" Style="{x:Null}" Foreground="{TemplateBinding Foreground}" Background="Transparent" Padding="0" HorizontalContentAlignment="Left" VerticalContentAlignment="Top">
                                    <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                </Label>
                                <Label TextBlock.LineHeight="{TemplateBinding FontSize}" Style="{x:Null}" Foreground="{TemplateBinding Foreground}" Background="Transparent" Padding="0" HorizontalContentAlignment="Left" VerticalContentAlignment="Top">
                                    <Label.FontSize>
                                        <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="FontSize">
                                            <Binding.Converter>
                                                <conv:FontSize75Converter />
                                            </Binding.Converter>
                                        </Binding>
                                    </Label.FontSize>
                                    <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      Content="{TemplateBinding Note}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                </Label>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardDisabled}" />
                            </Trigger.EnterActions>
                            <Trigger.Setters>
                                <Setter Property="Foreground" Value="#ADADAD" />
                            </Trigger.Setters>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardDisabledOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsDefaulted" Value="False" />
                                <Condition Property="IsEnabled" Value="True" />
                                <Condition Property="IsFocused" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsPressed" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardFocusedOn}" />
                                <BeginStoryboard Storyboard="{StaticResource StoryboardFocused}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardFocusedOff}" />
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsDefaulted" Value="True" />
                                <Condition Property="IsFocused" Value="False" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsPressed" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardDefaultedOn}" />
                                <BeginStoryboard Storyboard="{StaticResource StoryboardDefaulted}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardDefaultedOff}" />
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsPressed" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter Property="Foreground" Value="#074AE5" />
                            </MultiTrigger.Setters>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardImageMouseOver}" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardImageMouseOverOff}" />
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOver}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardMouseOverOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardPressed}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource StoryboardPressedOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>